from lib.clock import rtc_clock
from lib.net import wifi
from utils import device

__service__ = "rtc_clock"
__description__ = "network rtc clock"


def init():
    if not wifi.is_connected():
        print("wifi not connected")
        return
    print("rtc clock created")
    clock = rtc_clock.clock
    clock.sync_network_time()
    device.update_boot_rtc(clock.get_datetime())

async def run():
    pass
